ShowContextMenuCallback

public interface ShowContextMenuCallback implements BrowserAsyncCallback<P, R>

This callback is invoked when the browser attempts to display a context menu, for example, when the user right-clicks on a misspelled word on the web page.

You can use this callback to display the standard Java popup menu and fill it with the menu items that you can obtain by invoking the customContextMenuItems method.

The Params contains information about the web page that attempts to show the context menu, the context menu location, the spellchecker result, etc.

Use the select method to select a context menu item and execute the action associated with this item.

Use the close to close the context menu without selecting any item.

If the callback throws an exception, the close method will be invoked.

Inheritors

Types

Link copied to clipboard
public final class Action extends AsyncCallbackAction<R>
An action providing a response to the ShowContextMenuCallback.
Link copied to clipboard
public interface Params
The parameters of the ShowContextMenuCallback.

Functions

Link copied to clipboard
public abstract void on(P params, R tell)
Invoked when the callback needs a response for the given callback parameters.